﻿<Tree Items="@Items" OnTreeItemClick="@OnTreeItemClick" />
<ConsoleLogger @ref="Logger" class="mt-3" />

@code {
    [NotNull]
    private ConsoleLogger? Logger { get; set; }

    private List<TreeItem> Items { get; set; } = TreeDataFoo.GetTreeItems();

    private Task OnTreeItemClick(TreeItem item)
    {
        Logger.Log($"TreeItem: {item.Text} clicked");
        return Task.CompletedTask;
    }
}
